<template>
    <div ref="infoWindow" class="custom-info-window">
        <img src="https://img.cyeyi.com/databoard/images/top-line.png" class="top-line">
        <img src="https://img.cyeyi.com/databoard/images/top-line.png" class="bottom-line">
        <div class="title">
            <img src="https://img.cyeyi.com/databoard/images/location.png" class="location">
            <div class="text">{{ hoverAreaName }}</div>
        </div>
        <div class="line"></div>
        <div class="content">
            <div class="item-box" v-for="(item,index) in areaData" :key="index">
                <div class="name">
                    {{ item.title }}
                </div>
                <div class="data">
                    {{ item.company_count }}
                </div>
            </div>
        </div>
    </div>
</template>
  
<script>
export default {
    props: {
        areaData: {
            type: Array,
            default: []
        },
        hoverAreaName: {
            type: String,
            default: ''
        }
    },
    data() {
        return {}
    }
};
</script>
  
<style scoped>
.custom-info-window {
    width: 244px;
    height: 314px;
    background: rgba(3, 10, 55, 0.8);
    border: 1px solid #146EBA;
    box-shadow: 0px 3px 22px 0px #00383F;
    border-radius: 6px;
    position: relative;
    padding-top: 10px;
    box-sizing: border-box;

    .top-line {
        position: absolute;
        top: -8px;
        left: -6px;
        width: 254px;
    }

    .bottom-line {
        position: absolute;
        bottom: -8px;
        left: -6px;
        width: 254px;
        transform: scaleY(-1);
    }

    .title {
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding-left: 15px;

        .location {
            width: 15px;
        }

        .text {
            font-size: 15px;
            font-family: Microsoft YaHei;
            font-weight: 400;
            color: #00FFFF;
            margin-left: 6px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
        }
    }

    .line {
        width: 221px;
        height: 2px;
        opacity: 0.2;
        background-color: #178BEA;
        margin-top: 9px;
        margin-left: 10px;
    }

    .content {
        width: 100%;
        height: 272px;
        padding: 17px;
        box-sizing: border-box;
        overflow-y: scroll;
        -ms-overflow-style: none;
        overflow: -moz-scrollbars-none;
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-row-gap: 24px;
        grid-column-gap: 5px;

        .item-box {
            width: 100px;
            display: flex;
            flex-direction: column;

            .name {
                width: 100%;
                font-size: 13px;
                font-family: Microsoft YaHei;
                font-weight: 400;
                color: #FFFFFF;
                overflow: hidden;
                text-overflow: ellipsis;
                display: -webkit-box;
                -webkit-line-clamp: 1;
                -webkit-box-orient: vertical;
            }

            .data {
                width: 100%;
                font-size: 21px;
                font-family: DIN;
                font-weight: 500;
                color: #00FFFF;
                margin-top: 12px;
                overflow: hidden;
                text-overflow: ellipsis;
                display: -webkit-box;
                -webkit-line-clamp: 1;
                -webkit-box-orient: vertical;
            }
        }
    }

    .content::-webkit-scrollbar {
        width: 0 !important
    }
}</style>
  